package com.spzx.cloud.order.controller;

import com.spzx.cloud.entity.Order;
import com.spzx.cloud.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/api/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping(value = "/findOrderByOrderId/{orderId}")
    public Order findOrderByOrderId(@PathVariable("orderId") Long orderId, @RequestHeader("Truth") String header) {
        System.out.println(header);
        return this.orderService.findOrderByOrderId(orderId);
    }

}